from selenium import webdriver
from time import sleep


user = 'xingfujiayuanjulebuCYDW1'
pwd = 'qqqqqq'

driver = webdriver.Chrome()
driver.get("http://172.16.1.21/loginPage")
driver.maximize_window()

# 用户登录
driver.find_element_by_xpath("//input[@type='text']").send_keys(user)

driver.find_element_by_xpath("//input[@type='password']").send_keys(pwd)
driver.find_element_by_id("loginBtn").click()
sleep(3)
#失信信息债务类自然人

driver.find_element_by_xpath("//div[2]/div/div/div[2]/div").click()
sleep(3)
driver.find_element_by_xpath("//div[2]/ul/li[2]").click()  #债务类——自然人
driver.get("http://172.16.1.21/loginTouser/credit/creditPub/debtNaturalPub")
sleep(2)
driver.find_element_by_xpath("//input").send_keys("杜鑫")
driver.find_element_by_xpath("(//input[@type='text'])[2]").send_keys("511321198908097830")
driver.find_element_by_xpath("(//input[@type='text'])[3]").send_keys('899.99')
sleep(1)
driver.find_element_by_xpath("//input[@name='']").send_keys("2011-02-01 00:00:00")
sleep(2)
driver.find_element_by_xpath("//textarea").click()
driver.find_element_by_xpath("//td/div/label/span/span").click()
js="var q=document.documentElement.scrollTop=100000"
driver.execute_script(js)
sleep(2)
driver.find_element_by_xpath('//div[9]/div/button/span').click()





